# import pandas as pd
# pd.set_option('display.unicode.east_asian_width',True)
# df=pd.read_excel('产品订单信息表.xlsx')
# df1=pd.crosstab(index=df['性别'],columns=df['产品类型'])
# print('统计性别和商品类型交叉频数的数据df1:\n',df1)
# df2=pd.crosstab(index=df['性别'],columns=df['产品类型'],margins=True)
# print('统计和汇总性别和商品类型交叉频数的数据df2:\n',df2)
# df3=pd.crosstab(index=df['性别'],columns=df['产品类型'],margins=True,normalize=True)
# print('统计和汇总性别和商品类型交叉频数的数据df3:\n',df3)
# df4=pd.crosstab(index=df['性别'],columns=df['产品类型'],margins=True,margins_name='总数',normalize='index')
# print('按行统计和汇总性别和商品类型交叉频数的数据df4:\n',df4)
# import pandas as pd
# pd.set_option('display.unicode.east_asian_width',True)
# df=pd.read_excel('产品订单信息表.xlsx')
# df1=pd.pivot_table(df,values='消费金额',index='性别',columns='产品类型',aggfunc='sum',margins=True,margins_name='总消费')
# print('统计和汇总性别,产品类型及总消费的数据df1:\n',df1)
# df2=pd.pivot_table(df,values='消费金额',index='性别',columns='产品类型')
# print('统计和汇总性别,产品类型及平均消费的数据df2:\n',df2)
# import numpy as np
# import pandas as pd
# data1=np.random.randint(1,7,10000)
# data2=np.random.randint(1,7,10000)
# arr=data1+data2
# df=pd.DataFrame(data1+data2)
# count=df.value_counts().sort_index()
# print('两个骰子抛掷数字和的统计结果:\n',count)
# print('偏度:',df.skew().iloc[0])
# print('峰度:',df.kurt().iloc[0])
import pandas as pd
pd.set_option('display.unicode.east_asian_width',True)
pd.set_option('expand_frame_repr',False)
df=pd.read_excel('营销和产品销量表.xlsx')
print(df.corr())